// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_first_app/main.dart';

void main() {
  var a = 10;
  var b = '''
  hello  
  dart
  !
  ''';
  print(b);

  List list1 = List();
  var list2 = new List();
  var list3;

  list1.add(1);
  list1.add(2);
  list1.add(3);

  var list4 = [0, ...list2]; // list2 不能为空
  var list5 = [0, ...?list3]; // list3 可以为空

  const list6 = [7, 8, 9];
//  list6[0] = 1;

  const list7 = [1, 2, 3, if (true) 4]; // 满足该条件，才会加入元素 4

  print(list7);
  const list8 = [1, 2, 3];
  var list9 = ["0", for (var i in list8) '$i'];
  print(list9);


  var set1 ={'1'};
  // {} 表示：map，
  // 空set 可以通过 <>{} 来表示。指定类型：<int>{},不指定类型 <dynamic>{}
  var set2 = <int>{};

  //字面量创建 ,建议指定类型
  Set<int> set3 = Set();
  set3.add(10);

  const set4 = {'a'};
  set4.add('a');

  // map  字面量创建
  var map1 = {0:'a',1:'b'};

  Map map2 = Map();
  map2[0] = 'a';

  //指定类型创建
  Map<String,String> map3 = Map();


}
